package interfacePaxos;

import server.Proposal;
import java.io.IOException;
import java.rmi.NotBoundException;
import java.rmi.Remote;
import java.rmi.RemoteException;

public interface PaxosRemote extends Remote {

  public boolean request(boolean lock, int number) throws RemoteException,
      IOException;

  public void notifyLearner(Proposal p) throws RemoteException;

  public boolean promise(int my_id, boolean b,
      Proposal my_last_accepted_proposal) throws RemoteException;

  void setServer() throws IOException, NotBoundException, RemoteException;

  public Proposal getProposalNumber() throws RemoteException;

  public boolean accept(Proposal current_proposal) throws RemoteException,
      IOException;

  public void prepare(Proposal current_proposal) throws RemoteException, IOException;

}
